Chris Pollett > Old Classses > CS157a
( Print View )

Student Corner:
  [Submit Sec3]
  [Grades Sec3]

  [
Lecture Notes]
  [Discussion Board]

Course Info:
  [Texts & Links]
  [Description]
  [Course Outcomes]
  [Outcomes Matrix]
  [Course Schedule]
  [Grading]
  [Requirements/HW/Quizzes]
  [Class Protocols]
  [Exam Info]
  [Regrades]
  [University Policies]
  [Announcements]

HW Assignments:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Hw5]  [Quizzes]

Practice Exams:
  [Mid1]  [Mid2]   [Final]

                           












HW#2 --- last modified January 28 2019 19:00:11..

Solution set.

Due date: Sep 26

Files to be submitted:
  Hw2.zip

Purpose:

Related Course Outcomes:

The main course outcomes covered by this assignment are:

CLO1 (Course Learning Outcome 1) -- Write relational algebra queries and predict given a database instance what such a query will return.

CLO2 -- Write SQL commands to create databases, create tables, insert/update/delete/retrieve rows in a common database management system.

CLO3 -- Use a database management system's bulk loader to populate a database.

Specification:

Do the following problems out of the book: Exercise 2.4.1 (a)-(e) where in (a) 3 is now 4, in (b) 100GB is now 80GB, in (c) manufacturer B is now manufacturer C, in (d) rather than color laser printers, I want non-color laser printers, and for (e) I want to sell PC's, not laptops. Also do Exercise 2.5.2 a-b. Exercise 3.1.1 and Exercise 3.2.1. Submit your answers in a file Hw2.pdf that you submit with the homework.

Next for each of the relations in Exercise 2.4.1 suggest which columns would make a good primary key. Also, suggest SQL types for each of the columns. Write this up in Hw2.pdf. Then create in sqlite each of these tables with the primary keys and types you describe. Insert the rows listed in this problem. Use .help to see how to do this from a text file in sqlite. Submit in transcript.txt a transcript of your sessions to create and populate this database.

Point Breakdown

Modified book problems (2pts each) 8pts
transcript.txt and 2.4.1 primary key and type identification as described above 2pts
Total10pts